package day10;

import java.util.ArrayList;
import java.util.List;
import java.util.function.Function;

public class jiekou {
    public static <R> List<R>map(List<Apple> datas, Function<Apple,R> fun){
        List<R> result = new ArrayList<>();
        for(Apple apple:datas){
            result.add(fun.apply(apple));
        }
        return result;
    }
}
